<?php get_header(); ?>
<!-- 搜索内容开始 -->
<div id="serch_main" class="main">
	<div class="am-g am-g-fixed am-padding-vertical-xl">
		<h1><span class="yu-text-normal am-text-xxl yu-border-bottom-blue">搜索结果</span></h1>
        <?php if ( have_posts() ) : ?>
          <?php while ( have_posts() ) : the_post(); ?>
	        <div class="list am-padding-vertical-lg am-margin-bottom-xl">
	        	<div class="am-u-md-6">
	        		<a href="<?php the_permalink(); ?>" class="img_link">
	        			<?php
	        				if(has_post_thumbnail()){ 
	        					echo the_post_thumbnail('post-thumbnail-464-200');
	        				} else {
	        					echo '<img src="'.get_template_directory_uri().'/assets/imgs/tem_logo.jpg">';
	        				}
	        			?>
	        		</a>
	        	</div>
	        	<div class="right_info am-u-md-6">
	        		<h4 class="list_title am-text-xl yu-text-normal am-margin-bottom-0"><?php the_title(); ?></h4>
	        		<div class="list_describe "><?php the_excerpt();?></div>
	        		<p class="list_info am-margin-0 am-padding-top-xs am-text-right">
	        			<span class="am-padding-right-sm"><i class="am-text-primary am-padding-right-xs am-icon-user"></i><?php the_author(); ?></span>
	        			<span class="am-padding-right-sm"><i class="am-text-primary am-padding-right-xs am-icon-calendar"></i><?php the_date('Y-m-d'); ?></span>
	        			<span class="am-padding-right-sm"><i class="am-text-primary am-padding-right-xs am-icon-eye"></i><?php get_post_views($post -> ID); ?>次</span>
	        		</p>
	        		<a href="<?php $out_link = get_post_meta($post->ID, "out_link",true);if($out_link){echo $out_link;}else{the_permalink();}?>" class="out_link am-btn am-btn-primary am-icon-external-link" target="_blank"></a>
	        	</div>
	        	<div class="am-cf"></div>
	        </div>
          <?php endwhile; ?>
        <?php endif; ?>
	    <div class="am-margin-vertical-sm page_nav">
	    	<?php par_pagenavi() ?>
	    </div>
	</div>
</div>
<!-- 搜索内容结束 -->
<?php get_footer(); ?>